home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.object,comp.lang.eiffel,comp.lang.c++,comp.lang.beta,comp.lang.java,comp.lang.sather
- Path: newsfeed.acns.nwu.edu!ftpbox!mothost!schbbs!news
- From: shang@corp.mot.com (David L. Shang)
- Subject: Re: What Should An Exception Handling Do? -- Clarification of rules
- Reply-To: shang@corp.mot.com
- Organization: MOTOROLA
- Date: Wed, 27 Mar 1996 13:48:00 GMT
- Message-ID: <1996Mar27.134800.18605@schbbs.mot.com>
- References: <4j948d$t3d@trumpet.uni-mannheim.de>
- Sender: news@schbbs.mot.com (SCHBBS News Account)
- Nntp-Posting-Host: 129.188.128.126
-
- In article <4j948d$t3d@trumpet.uni-mannheim.de> mw@ipx2.rz.uni-mannheim.de
- (Marc Wachowitz) writes:
- > David L. Shang (shang@corp.mot.com) wrote:
- > > But an exception is not necessarily an error. Sometimes it is an
- > > condition that requires some extraordinary computation, a condition
- > > that is not supposed for a regular case, [...]
- >
- > Let's look at the problem with fresh eyes, without thinking immediately
- > about using the technical feature called "exception" in a few programming
- > languages.
- >
- > Some routine (often supposed to be reused for different contexts) wants
- > the "advice" of its caller (or the caller's caller etc.) how to handle an
- > unusual condition ("advice" might imply activities, like a user query).
- >
-
- Couldn't agree more. That is what an exception handling is supposed to
- do, and that is the case where exception handling is helpful. Back to
- my original post, I analyzed two cases for exception handling:
-
- * the callee decides how to handle the exception; and
- * the caller decides how to handle the exception;
-
- And I concluded that the second case is more important and useful.
-
- David Shang
-
-